home *** CD-ROM | disk | FTP | other *** search
- #include "my color.h"
- do_update(the_event)
- EventRecord *the_event;
- {
- Rect erase_rect;
- CWindowPeek this_window;
- CWindowPtr active_window;
-
- GetPort(&savedPort); /* SAVE THE CURRENT P0RT */
- active_window = (CWindowPtr)the_event->message;
- SetPort((GrafPtr)active_window); /* SET PORT TO THE ONE NEEDING UPDATING */
- this_window = (CWindowPeek)active_window;
- erase_rect = active_window->portRect;
- erase_rect.bottom -= (BAR_WIDTH + ONE_PIXEL); /* Don't erase the scroll bars. If you do, they will flicker terribly */
- erase_rect.right -= (BAR_WIDTH + ONE_PIXEL);
- BeginUpdate(active_window);
- EraseRect(&erase_rect);
- TEUpdate(&active_window->portRect, this_window->refCon);
- DrawControls(active_window);
- DrawGrowIcon(active_window);
- EndUpdate(active_window);
- SetPort(savedPort); /* set port to original port */
- }
-